CREATE TABLE employee (
     first_name VARCHAR2(128),
     last_name VARCHAR2(128),
     empID NUMBER,
     salary NUMBER(6) ENCRYPT
);
CREATE TABLE employee (
     first_name VARCHAR2(128),
     last_name VARCHAR2(128),
     empID NUMBER ENCRYPT NO SALT,
     salary NUMBER(6) ENCRYPT USING '3DES168'
);

CREATE TABLE persons OF person
  ( homeaddress NOT NULL,
      UNIQUE (homeaddress.phone),
      CHECK (homeaddress.zip IS NOT NULL),
      CHECK (homeaddress.city <> 'San Francisco') );

CREATE TABLE purchaseorder_as_table OF XMLType
  XMLSCHEMA "http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd"
  ELEMENT "PurchaseOrder";

CREATE TABLE purchaseorder_as_column (id NUMBER, xml_document XMLType)
  XMLTYPE COLUMN xml_document
  ELEMENT
    "http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd#PurchaseOrder";

CREATE TABLE po_binaryxml OF XMLType
 XMLTYPE STORE AS BINARY XML
 VIRTUAL COLUMNS
 (DATE_COL AS (XMLCast(XMLQuery('/PurchaseOrder/@orderDate'
 PASSING OBJECT_VALUE RETURNING CONTENT)
 AS DATE))) ;


create table junk (
       me date,
       primary key (me)
);

CREATE TABLE TEST
      AS 
      WITH TESTCTE AS (
        SELECT 1 ONE FROM DUAL
      )
      SELECT 'A', 'B', 'C'
      FROM DUAL
      JOIN TESTCTE;

CREATE TABLE DEMO (
    ID NUMBER GENERATED BY DEFAULT AS IDENTITY,
    TEST VARCHAR2(100) NOT NULL
);

CREATE TABLE DEMO (
    ID NUMBER GENERATED BY DEFAULT ON NULL AS IDENTITY,
    TEST VARCHAR2(100) NOT NULL
);

CREATE TABLE DEMO (
    ID NUMBER GENERATED ALWAYS AS IDENTITY,
    TEST VARCHAR2(100) NOT NULL
);

CREATE TABLE products (
    id NUMBER(4) GENERATED BY DEFAULT ON NULL AS IDENTITY (START WITH 101) NOT NULL PRIMARY KEY,
    name VARCHAR2(255) NOT NULL,
    description VARCHAR2(512),
    weight FLOAT,
    PRICE NUMERIC(10,-2)
);

CREATE TABLE products (
    id NUMBER(4) GENERATED BY DEFAULT ON NULL AS IDENTITY (START WITH 101 INCREMENT BY 1 CYCLE CACHE 200) NOT NULL PRIMARY KEY,
    name VARCHAR2(255) NOT NULL,
    description VARCHAR2(512),
    weight FLOAT,
    PRICE NUMERIC(10,-2)
);

create table "DVSADM".CMP3$58238005 nocompress tablespace "DVS_PROOF" nologging lob (VALUE) store as (tablespace "DVS_PROOF" enable storage in row nocache nologging) as select /*+ DYNAMIC_SAMPLING(0) FULL("DVSADM"."DVS_ARCHIVE") */ * from "DVSADM"."DVS_ARCHIVE" sample block( 6.734) mytab;

CREATE TABLE "APPLSYS"."FND_SEC_GUIDELINES_TL" (
    "CODE" VARCHAR2(20) NOT NULL ENABLE,
    "TITLE" VARCHAR2(100) NOT NULL ENABLE,
    "DESCRIPTION" VARCHAR2(2000) NOT NULL ENABLE,
    "INFO" CLOB NOT NULL ENABLE,
    "LANGUAGE" VARCHAR2(30) NOT NULL ENABLE,
    "SOURCE_LANG" VARCHAR2(4) NOT NULL ENABLE,
    "CREATED_BY" VARCHAR2(30) NOT NULL ENABLE,
    "CREATION_DATE" DATE NOT NULL ENABLE,
    "LAST_UPDATED_BY" NUMBER(15,0) NOT NULL ENABLE,
    "LAST_UPDATE_DATE" DATE NOT NULL ENABLE,
    "LAST_UPDATE_LOGIN" NUMBER(15,0))
    PCTFREE 10 PCTUSED 40 INITRANS 10 MAXTRANS 255 LOGGING
    STORAGE(
        INITIAL 4096
        NEXT 131072
        MINEXTENTS 1
        MAXEXTENTS 2147483645
        PCTINCREASE 0
        FREELISTS 4
        FREELIST GROUPS 4
        BUFFER_POOL DEFAULT)
    TABLESPACE "APPS_TS_TX_DATA"
    LOB ("INFO")
    STORE AS (
        TABLESPACE "APPS_TS_TX_DATA" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
        NOCACHE
        STORAGE(
            INITIAL 4096
            NEXT 131072
            MINEXTENTS 1
            MAXEXTENTS 2147483645
            PCTINCREASE 0
            FREELISTS 4
            FREELIST GROUPS 4
            BUFFER_POOL DEFAULT))
;

CREATE TABLE CATEGORIES (	
    "CATEGORY_ID" NUMBER(9,0), 
	"CATEGORY_NAME" VARCHAR2(15 BYTE), 
	"DESCRIPTION" VARCHAR2(2000 BYTE), 
	"PICTURE" VARCHAR2(255 BYTE)
) SEGMENT CREATION IMMEDIATE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "USERS" ;

CREATE TABLE "t_ddl_0027"(
    "PID" INT,
    "FID" INT,
    "NAME" VARCHAR(50) DEFAULT 'Tom',
    "ADDRESS" VARCHAR(50) NOT NULL,
    "DEPT" VARCHAR(50),
    CONSTRAINT "PK_ID" PRIMARY KEY("PID"),
    CONSTRAINT "CK_DEPT" CHECK ("DEPT" IN('IT', 'SALES', 'MANAGER')));

CREATE TABLE "C##RCUSER"."JSON_TRANS"(
    "ID" NUMBER(8,0) NOT NULL ENABLE,
    "TRANS_MSG" CLOB,
    CONSTRAINT "CHECK_JSON" CHECK (trans_msg is json) ENABLE,
    PRIMARY KEY ("ID") USING INDEX ENABLE,
    SUPPLEMENTAL LOG DATA (ALL) COLUMNS);
